using System;
using System.Text;
using ToffeeHttp.Runtime.Core;
using UnityEngine;
using UnityEngine.Networking;

namespace ToffeeHttp.Runtime
{
    /// <summary>
    /// Post网络请求，且使用Form表单的形式传输
    /// </summary>
    public class PostHandlerForm : IRequestHandler
    {
        /// <summary>
        /// 以Post方式请求，接收一个wwwform表单
        /// </summary>
        /// <param name="uri"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public UnityWebRequest RequestCreate(Uri uri, object msg)
        {
            UnityWebRequest  requestU = UnityWebRequest.Post(uri , (WWWForm)msg);
            return requestU;
        }

    }
}